﻿@model ecommerce2011.Models.CartItem

@{
    ViewBag.Title = "Cambiar Cantidad";
}

<h2>Cambiar Cantidad</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Item del Carrito</legend>

        <div class="editor-label">
            <strong>Referencia</strong>
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.ProductId)
            @Html.HiddenFor(model => model.ProductId)
        </div>

        <div class="editor-label">
            <strong>Nombre</strong>
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.Name)
        </div>

        <div class="editor-label">
            <strong>Cantidad</strong>
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Quantity)
            @Html.ValidationMessageFor(model => model.Quantity)
        </div>

        <div class="editor-label">
            <strong>Precio Unitario</strong>
        </div>
        <div class="editor-field">
            @Html.DisplayFor(model => model.UnitPrice)
        </div>

     @*   <div class="editor-label">
            @Html.LabelFor(model => model.TotalPrice)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.TotalPrice)
            @Html.ValidationMessageFor(model => model.TotalPrice)
        </div>*@

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Volver al carrito", "Index")
</div>
